<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="恢复文件集">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="Files-0040.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
<meta name="DC.Publisher" content="20240320">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="Files-0043">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>恢复文件集</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="Files-0043"></a><a name="Files-0043"></a>

<h1 class="topictitle1">恢复文件集</h1>
<div><p>当需要对已备份的文件集进行恢复时，可以参考本节恢复文件集至原位置或新位置。</p>
<div class="section"><h4 class="sectiontitle">前提条件</h4><p>恢复前请确保恢复目标位置的数据目录剩余空间大于恢复副本缩减前大小，否则恢复将失败。</p>
</div>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><ol><li><span>选择<span class="uicontrol" id="Files-0043__zh-cn_topic_0000001839142377_uicontrol1888202316279">“<span id="Files-0043__zh-cn_topic_0000001839142377_text16882112392716">数据利用</span> &gt; <span id="Files-0043__zh-cn_topic_0000001839142377_text13882182372717">副本数据</span> &gt; 文件系统 &gt; <span id="Files-0043__zh-cn_topic_0000001839142377_text959224913332">文件集</span>”</span>。</span><p><div class="note" id="Files-0043__zh-cn_topic_0000001839142377_note192321935714"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p id="Files-0043__zh-cn_topic_0000001839142377_p62332915575">对于1.5.0版本，选择<span class="uicontrol" id="Files-0043__zh-cn_topic_0000001839142377_uicontrol35211628145713">“<span id="Files-0043__zh-cn_topic_0000001839142377_text15521328105712">数据利用</span> &gt; <span id="Files-0043__zh-cn_topic_0000001839142377_text9521152813577">副本数据</span> &gt; <span id="Files-0043__zh-cn_topic_0000001839142377_text18417734832">裸机</span> &gt; <span id="Files-0043__zh-cn_topic_0000001839142377_text05221228115716">文件集</span>”</span>。</p>
</div></div>
</p></li><li><span>您可以以文件集资源维度或以副本维度查找副本，本节以资源维度为例进行说明。</span><p><p>在<span class="uicontrol">“<span>资源</span>”</span>页签，根据资源名称查找到需要恢复的资源，并单击资源名称。</p>
</p></li><li><span>在<span class="uicontrol">“<span>副本数据</span>”</span>区域，依次选择年、月、天找到副本。</span><p><p>当时间下方显示<span><img src="zh-cn_image_0000001792548360.png"></span>，即表示该月、该天存在副本。</p>
</p></li><li><span>在副本所在行，单击<span class="uicontrol">“<span>更多</span> &gt; <span>恢复</span>”</span>。</span><p><p>相关参数说明如<a href="#Files-0043__table93951625101715">表1</a>所示。</p>

<div class="tablenoborder"><a name="Files-0043__table93951625101715"></a><a name="table93951625101715"></a><table cellpadding="4" cellspacing="0" summary="" id="Files-0043__table93951625101715" frame="border" border="1" rules="all"><caption><b>表1 </b>恢复文件集参数说明</caption><colgroup><col style="width:23.09%"><col style="width:76.91%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="23.09%" id="mcps1.3.3.2.4.2.2.2.3.1.1"><p>参数</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="76.91%" id="mcps1.3.3.2.4.2.2.2.3.1.2"><p>说明</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>恢复至</span></p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>文件集的恢复位置。</p>
<ul><li><span>原位置</span>：恢复至原机原位置。</li><li><span>新位置</span>：恢复至新位置，需要指定恢复的目标主机及路径。<div class="note" id="Files-0043__note665716381615"><span class="notetitle"> 说明： </span><div class="notebody"><p id="Files-0043__p17892164110119">Windows操作系统对文件执行新位置恢复后，如果恢复目标位置未显示恢复后的文件，请在Windows操作系统中打开文件夹，选择“查看”页签，单击“选项”打开“文件夹选项”对话框，选择“查看”页签，取消勾选“隐藏受保护的操作系统文件（推荐）”后便可显示。</p>
</div></div>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>位置</span></p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>仅在原位置恢复时显示该参数，恢复至原机原位置。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>目标主机</span></p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>仅在新位置恢复时显示该参数，选择恢复的目标主机。</p>
<p>可通过搜索主机名称或主机IP地址选择相应主机。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>目标路径</span></p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>仅在新位置恢复时显示该参数，选择恢复的目标位置。</p>
<p>展开数据源后可通过搜索文件名称选择相应路径。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p>增量恢复</p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>开启后可以恢复增量备份时增加和修改的文件，不会删除增量备份时删除的文件。</p>
<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><p>该参数仅在1.6.0及后续版本展示，仅支持恢复1.6.0及后续版本的副本。</p>
</div></div>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>覆盖规则</span></p>
</td>
<td class="cellrowborder" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>当恢复路径中存在同名文件时，选择替换或跳过已存在的文件。</p>
<ul><li><span>直接替换已经存在的文件</span></li><li><span>忽略已存在的文件</span>，即跳过这些同名文件不替换。</li><li><span>只替换比恢复文件更旧的文件</span>，即保存目标位置上较新的同名文件不替换。<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><p>硬链接文件副本恢复时，如果恢复路径存在同名文件，覆盖规则仅支持“直接替换已存在的文件”。</p>
</div></div>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="23.09%" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>恢复前执行脚本</span></p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="76.91%" headers="mcps1.3.3.2.4.2.2.2.3.1.2 "><p>您可以根据实际需求，配置“恢复前执行脚本”、“恢复成功执行脚本”和“恢复失败执行脚本”，当恢复任务事件中出现“开始执行前置任务”提示后，配置的脚本会在对应场景下执行。</p>
<ul><li><span>如果是非Windows操作系统，请输入脚本名称，脚本名称以</span><strong>.sh</strong><span>结尾。确保脚本已存放在ProtectAgent安装目录下的</span><span class="filepath">“DataBackup/ProtectClient/ProtectClient-E/sbin/thirdparty”</span><span>目录下。</span></li><li><span>如果是Windows操作系统，请输入脚本名称，脚本名称以</span><strong>.bat</strong><span>结尾。确保脚本已存放在</span><span>ProtectAgent</span><span>安装目录下的</span><span class="filepath">“DataBackup\ProtectClient\ProtectClient-E\bin\thirdparty”</span><span>目录下。</span><div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><p>当配置了<span class="uicontrol">“<span>恢复成功执行脚本</span>”</span>时，即使该脚本执行失败，<span>OceanProtect</span>上也会显示恢复任务的状态为<span class="uicontrol">“<span>成功</span>”</span>。请您留意任务详情中是否有后置脚本执行失败的相关提示，如有请及时修正脚本。</p>
</div></div>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>恢复成功执行脚本</span></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.2.2.2.3.1.1 "><p><span>恢复失败执行脚本</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li><span>单击<span class="uicontrol">“确定”</span>。</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="Files-0040.html">恢复</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>